<?php
namespace app\model;

use app\model\Base;



class OpenClass extends Base
{
        /**
     *定义主键
     * @var string 
     */
    protected $pk = 'id';
        /**
     * 列表(分页)
     * @param  string/array  $where  查询条件
     * @return obj
     */
    public function listQuery(string|array $where = '')
    {
        return $this->where($where)->field('*')->order('start_time', 'desc')->paginate(input('limit/d'));
    }

       /**
     * 列表
     * @param  string/array  $where  查询条件
     * @param  string        $field  查询的字段
     * @return array
     */
    public function listArray(string|array $where = '', string $field = '*')
    {
        return $this->where($where)->order('start_time', 'desc')->column($field);
    }
}

